package views;

import java.io.IOException;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import core.DeleteTableSequencer;

@RequestMapping(value="form")
@Controller
public class FormController {

	@RequestMapping(method = RequestMethod.GET)
	public ModelAndView renderPage()
	throws IOException {
		System.out.println("get");
		return new ModelAndView("welcomePage");
	}

	@RequestMapping(method = RequestMethod.POST)
	public ModelAndView getDependencies(@RequestParam final String schema) {

		DeleteTableSequencer sequencer = new DeleteTableSequencer();

		sequencer.getResults(null);

		return new ModelAndView("welcomePage");
	}

	//
	// @RequestMapping(method = RequestMethod.GET)
	// public ModelAndView helloWorld(){
	//
	// ModelAndView model = new ModelAndView("HelloWorldPage");
	// model.addObject("msg", "hello world");
	//
	// return model;
	// }

}
